<%@ page contentType="text/html;charset=UTF-8"%>
<html>
<head>
<title>接口注册</title>
    <%@ include file="/common/meta.jsp" %>
	<%@ include file="/common/import.jsp" %>
	<script type="text/javascript">

	var save_url = '${ctx}/audit/auditRule/save.action';
	function save(){
		$('#addAuditRuleForm').form('submit', {
			type:'post',
		    url:save_url,
		    success:function(data){
		    	var oTxt = jQuery.parseJSON(data);
				var mess = oTxt.msg;
				var flag = oTxt.flag;
				if(flag=="T"){
					alert("操作成功");
					window.parent.closeWin();
					window.parent.reload();
		        	
				}else{
					alert("操作失败");
				}
				
		    },
		    error:function(){
				 alert("请检查服务器！");
			}
		});
     }

	
	function cancel(){
		window.parent.closeWin();
	}
	
	</script>
</head>
<body>	

		<form id="addAuditRuleForm" name="addAuditRuleForm" method="post" >
			<%--<input type="hidden" name="formToken" id="formToken" value="${formToken}"/>
			--%><table class="datagrid-body">
			<tr>
				<td class="datagrid-header">规则ID<font color=red>*</font></td>
				<td>
					<input  id="ruleId" name="ruleId" value="${ruleId}"  type="text" >
				</td>
			</tr>
			<tr>
				<td class="datagrid-header">表名</td>
				<td>
					<input name="tableName" value="${tableName }" type="text" >
				</td>
			</tr>
			<tr>
				<td class="datagrid-header">是否起点<font color=red>*</font></td>
				<td>
					<label><input type="radio" name="ifStart" 
						<c:if test="${ifStart=='T'}">checked="checked"</c:if>
					 value="T" checked="ifStart" >是</label>
					 
  					<label><input type="radio" name="ifStart" 
  						<c:if test="${ifStart=='F'}">checked="checked"</c:if>
  					value="F">否</label>
				</td>
			</tr>
			<tr>
				<td class="datagrid-header">审核人</td>
				<td>
					<input type="text" id="checkUser"  name="checkUser" value="${checkUser }" >
				</td>
			</tr>
			<tr>
				<td class="datagrid-header">通过</td>
				<td>
					<input type="text" id="next" name="next" value="${next }" >
				</td>
			</tr>
			<tr>
				<td class="datagrid-header">不通过</td>
				<td>
					<input type="text" id="last" name="last" value="${last }" >
				</td>
			</tr>
			<tr>
				<td class="datagrid-header">次数</td>
				<td>
					<input type="text" id="num" name="num" value="${num }" >
				</td>
			</tr>
			<tr>
				<td class="datagrid-header">审核类型</td>
				<td>
					<input type="text" id="auditType" name="auditType" value="${auditType }" >
				</td>
			</tr>
			
			<tr>
				<td colspan="2" align="center">	
				<a class="easyui-linkbutton" id="bt1" iconCls="icon-ok" onclick="save();">提交</a>  
	    		<a class="easyui-linkbutton" id="bt2" iconCls="icon-cancel" onclick="cancel();">取消</a>
				</td>
			</tr>
			</table>
		</form>
</body>
</html>
